-- background: 2747 from stack: in -- bmap block id: 3078 -- flags: 0000 -- background id: 0 -- name: ----- HyperTalk script ----- on removeFormats if the selectedText is empty then exit removeFormats put the selectedText into theText set cursor to 4 repeat put offset("{",theText) into left put offset("}",theText) into right if (left >= right) or (left is 0) then exit repeat delete char right of theText repeat put char left of theText into nextChar delete char left of theText if nextChar is " " then exit repeat end repeat end repeat put theText into the selection end removeFormats on addFormat theCode if theCode is empty then exit addFormat put the selectedChunk into theSel -- (so it can be re selected) put "{\" & theCode && the selectedText & "}" into the selection put word 4 of the selectedChunk into word 4 of theSel select theSel end addFormat -- part 1 (field) -- low flags: 80 -- high flags: 0007 -- rect: left=378 top=150 right=334 bottom=511 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: fontList ----- HyperTalk script ----- on mouseUp hide me end mouseUp